Skip to content

feat(desktop): wire the Skills screen + resolve cli_path from PATH#126

Merged
oratis merged 1 commit into
mainfrom
feat/desktop-skills-screen
May 31, 2026
Merged

feat(desktop): wire the Skills screen + resolve cli_path from PATH#126
oratis merged 1 commit into
mainfrom
feat/desktop-skills-screen

Conversation

@oratis

@oratis oratis commented May 31, 2026

Copy link
Copy Markdown
Owner

Summary

Unstubs window.deepcode.skills.list() (was []), completing the desktop Plugins + Skills pair. Built-in skills are now bundled into the .app as a resource so the renderer (which can't run core's node:fs loadSkills) can list them via Rust.

Changes

  • tauri.conf.json: bundle.resources copies packages/core/skills<Resources>/skills.
  • commands.rs list_skills(app, cwd?): built-in from the Tauri resource dir + user (~/.deepcode/skills) + project (<cwd>/.deepcode/skills). The pure collect_skills(builtin, user, project) + parse_skill_frontmatter (extracts name/description from the --- block) are cargo-tested; each row carries the SKILL.md body for the detail pane. camelCase serde (§8a).
  • cli_path(): now resolves a globally-installed deepcode on PATH (was always None) — useful for the "drop into CLI" affordance. Bundling the CLI binary itself stays future work.
  • tauri-api.ts listSkills(cwd) + SkillInfo; window-shim.ts skills.list()/body() call it with the picked project path (loadProjectPath()).

Tests

  • +4 Rust (cargo test, 16 green): frontmatter parse (with/without fence), SkillInfo camelCase contract, collect_skills across builtin/user/project + name sort.
  • +1 renderer (tauri-api.test.ts, desktop 28 green): list_skills command name + cwd arg.

Verification boundary

The pure collector + parser are unit-tested; cli_path PATH resolution is straightforward. The bundled resource_dir() lookup only resolves in a packaged tauri build — not exercised in this CI (JS-only) or tauri dev. The config + API usage are standard Tauri 2.

🤖 Generated with Claude Code

Unstubs `window.deepcode.skills.list()` (was []), completing the desktop
Plugins+Skills pair. Built-in skills are now bundled into the .app as a
resource so the renderer (which can't run core's node:fs loadSkills) can list
them via Rust.

- tauri.conf.json: bundle `packages/core/skills` → `<Resources>/skills`.
- commands.rs `list_skills(app, cwd?)`: built-in from the Tauri resource dir +
  user (~/.deepcode/skills) + project (<cwd>/.deepcode/skills). Pure
  `collect_skills(builtin, user, project)` + `parse_skill_frontmatter` (reads
  name/description from the `---` block) so it's cargo-tested; each row carries
  the SKILL.md body for the detail pane. camelCase serde (§8a).
- cli_path(): now resolves a globally-installed `deepcode` on PATH (was always
  None) — useful for "drop into the CLI"; bundling the CLI itself stays future.
- tauri-api.ts listSkills(cwd) + SkillInfo; window-shim skills.list()/body()
  call it with the picked project path.

Tests: +4 Rust (frontmatter parse ×2, SkillInfo camelCase, collect_skills
across builtin/user/project + sort), +1 renderer (list_skills cmd + cwd).
Rust 16 green (cargo), desktop 28 green.

Note: the built-in resource path resolves in a packaged .app; cargo tests cover
the pure collector/parser, but the bundled resource_dir lookup is only
runtime-exercised on a real `tauri build` (not in this CI, which is JS-only).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@oratis oratis merged commit 15f61e3 into main May 31, 2026
3 checks passed
@oratis oratis deleted the feat/desktop-skills-screen branch May 31, 2026 14:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant